<template>
	<view
	class="box">
		<label>姓名 <input type="text" v-model="info.name" /></label>
		<label>手机号码 <input type="number" v-model="info.phone" /></label>
		<button @click="login">登录</button>
	</view>
</template>

<script lang="ts" setup>
	import {ref } from 'vue'
	interface Obj {
		name:string
		phone:string
	}
	const info = ref<Obj>({
		name:'',
		phone:''+new Date().getTime()
	})
	const login = ()=>{
		uni.setStorageSync("info",info.value)
		uni.navigateTo({
			url:'/pages/index/index'
		})
	}
	
</script>

<style>
	.box{
		width: 400px;
		height: 600px;
		margin: 100px auto;
	}
input{
	border: 1px solid gray;
}
</style>
